import request from '@/utils/request'

//获取列表
export function GetModelList(data) {
    return request({
        url: '/ytjyadmin/ECourse/GetModelList',
        method: 'post',
        data
    })
}

//新增或者编辑
export function PostModel(data) {
    return request({
        url: '/ytjyadmin/ECourse/PostModel',
        method: 'post',
        data
    })
}

//删除
export function DeleteModel(id) {
    return request({
        url: '/ytjyadmin/ECourse/DeleteModel?id=' + id,
        method: 'get'
    })
}

//获取课程关联的视频列表
export function GetCourseVideoList(data) {
    return request({
        url: '/ytjyadmin/ECourse/GetCourseVideoList',
        method: 'post',
        data
    })
}

//保存课程关联的视频列表
export function CourseVideoPost(data) {
    return request({
        url: '/ytjyadmin/ECourse/CourseVideoPost',
        method: 'post',
        data
    })
}

//获取课程下拉框所需要讲师列表
export function GetTeacherList() {
    return request({
        url: '/ytjyadmin/ECourse/GetTeacherList',
        method: 'get'
    })
}


//获取列表
export function GetChapterList(data) {
    return request({
        url: '/ytjyadmin/EChapter/GetModelList',
        method: 'post',
        data
    })
}

//新增
export function AddChapter(data) {
    return request({
        url: '/ytjyadmin/EChapter/AddModel',
        method: 'post',
        data
    })
}

//新增或者删除
export function PostChapter(data) {
    return request({
        url: '/ytjyadmin/EChapter/PostModel',
        method: 'post',
        data
    })
}

//删除章节
export function DeleteChapter(id) {
    return request({
        url: '/ytjyadmin/EChapter/DeleteModel?id=' + id,
        method: 'get'
    })
}
